<%
#
# Copyright @year@ @owner@
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# <@(#) $Id: _day_navi.rhtml,v 1.4 2007/10/02 13:55:07 jury Exp $>
#
# 改定履歴
# 2007/10/01 (岡村 淳司) [S49] 統合Plugin化 ロール、アクセス権
# 2007/09/24 (岡村 淳司) [S40] 統合Plugin化
# 2007/09/22 (岡村 淳司) [S41] コンポーネント配置見直し
# 2007/09/19 (岡村 淳司) [S33] コントローラのテスト
# 2007/09/17 (岡村 淳司) [S28] 日付ジャンプ
# 2007/09/13 (岡村 淳司) [S23] sesssion[:date]の解放
# 2007/09/09 (岡村 淳司) [S22] 戻るボタン
# 2007/09/03 (岡村 淳司) 新規作成 [S7] キーナビゲーションサポート
#
-%>
<%= javascript_include_tag "jkl-calendar_IF"%>
<script type="text/javascript">
	var cal1 = new JKL.Calendar("calid","formid","colname");
	cal1.start_day = 1;
</script>
<%= stylesheet_link_tag "r3_navi", :media => "all" %>
<div id="contents_navigator" class="navigator">
	<div style="display:inline">
	<%= link_to "<< #{f_ymdw((@day - 1))}",
		{:controller => "view/day", :action=>"index", :date => (@day - 1).to_ymd},
		{:id => 'day_navigator_prev', :class => "navigator_prev", :onclick => "$('loading').show()" } %>
	</div>
	|
	<div style="display:inline">
	<%= link_to "今日",
		{:controller => "view/day"},
		{:id => 'day_navigator_current', :class => "navigator_current", :onclick => "$('loading').show()" } %>
	</div>
	|
	<div style="display:inline">
	<%= link_to "週表示",
		{:controller => "view/week", :action => "goto_by_date", :date => @day.to_ymd},
		{:id => 'day_navigator_current', :class => "navigator_current", :onclick => "$('loading').show()" } %>
	</div>
	|
	<div style="display:inline">
	<%= link_to "#{f_ymdw((@day + 1))} >>",
		{:controller => "view/day", :action=>"index", :date => (@day + 1).to_ymd},
		{:id => 'day_navigator_next', :class => "navigator_next", :onclick => "$('loading').show()" } %>
	</div>
</div>

<div style="position:absolute;top:42px;right:35px;">
	<div style="display:inline;vertical-align:middle;float:left;text-align:left;">
		<form id="formid" action="" style="margin:0px;padding:0px;">
		<input type="text"
			id="calvalue"
			name="colname"
			onClick="cal1.write();";
			onChange="cal1.getFormValue();cal1.hide();"
			size="10"
			maxlength="10"
			style="text-align:center;"
			readonly ><br/>
			<div id="calid" style="display:none"></div>
		</form>
	</div>
	<div style="margin-left:5px;display:inline;vertical-align:middle;float:left;" >
		<%= form_remote_tag(:url => {:controller => "view/day", :action => "goto" },
							:before => "if($F('calvalue')==null || $F('calvalue')==''){return false;}else{$('goto_date').value=$F('calvalue');$('loading').show();}",
					 		:html => {:id =>"goto_form", :style => "display:inline;margin:0px;" }) %>
			<%= hidden_field_tag "goto_date", "" %>
			<%= image_submit_tag "go.gif" %>
		<%= end_form_tag %>
	</div>
</div>
